<?php
include_once '../../Core/Conexion.php';
include_once '../../Core/ControladorSet.php';
include_once '../../Core/InterfazDatos.php';
///****
include_once '../entidades/Periodo.php';
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of editar
 *
 * @author cHr15t14n
 */
class editar extends ControladorSet{
    public function buscarValores() {
        $tabla="";
        $entidad= new Periodo($_GET['codigo'], "", "", "","");
        $consulta=$this->conexion->consultaTabla($entidad);
        $fila = mysql_fetch_array($consulta);
        
        do {
            $this->diccionario['idPeriodo'] = $fila[0];
            $this->diccionario['fechaInicio'] = $fila[1];
            $this->diccionario['fechaFin'] = $fila[2];
            $this->diccionario['estado'] = $fila[3];
            $this->diccionario['observacion'] = $fila[4];            
           
        } while ($fila = mysql_fetch_array($consulta));
        
    }

    public function setDiccionario() {
        $this->diccionario = array(
            "idPeriodo" => "vacio",
            "fechaInicio" => "vacio",
            "fechaFin" => "vacio",            
            "estado" => "vacio",
            "observacion" => "vacio"           
            
        );
    }
    
    public function setValorSesion() {
        $this->valorSesion = array("admin", "", "");
    }

//put your code here
}

$controlador = new editar('editarVista.php');
$controlador->rederizarPagina();

